package com.cn.jdia.tas.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jdia.tas.dao.U_departmentMapper;
import com.cn.jdia.tas.model.U_department;
import com.cn.jdia.tas.service.IDepartmentService;

@Service("departmentService")
public class IDepartmentServiceImpl implements IDepartmentService {

	@Resource
	private U_departmentMapper departmentDao;
	
	@Override
	public List<U_department> getDeptInfo() {
		return this.departmentDao.getdeptinfo();
	}

	@Override
	public List<U_department> getSubDeptInfo(String parentDeptId) {
		return this.departmentDao.querySubDept(parentDeptId);
	}

	@Override
	public U_department getParentDept(String deptId) {
		return this.departmentDao.selectParentDept(deptId);
	}

	@Override
	public U_department getDeptDetailInfo(String deptId) {
		return this.departmentDao.selectByPrimaryKey(deptId);
	}

}
